package com.jiangyao.model.dto.backend;

import com.jiangyao.model.dto.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * 广告bannerDTO
 *
 * @author: yangyongchuan
 * @create: 2020年08月26日 22:33
 */
@ApiModel("广告bannerDTO")
@Data
public class BannerDTO implements BaseDTO {

	private static final long serialVersionUID = 2317546100440371993L;

	/**
	 * banner ID
	 */
	@ApiModelProperty("主键id")
	@NotNull(message = "bannerId不能为空", groups = {Edit.class, Delete.class, Detail.class})
	private Integer bannerId;

	/**
	 * 广告代码
	 */
	@ApiModelProperty("广告代码")
	@NotNull(message = "广告代码不能为空", groups = {Edit.class, Add.class})
	@NotEmpty(message = "广告代码不能为空", groups = {Edit.class, Add.class})
	private String bannerCode;

	/**
	 * 广告位中文名称
	 */
	@ApiModelProperty("广告名称")
	@NotNull(message = "广告名称不能为空", groups = {Edit.class, Add.class})
	@NotEmpty(message = "广告名称不能为空", groups = {Edit.class, Add.class})
	private String bannerName;

	/**
	 * 类型 1-链接 2-富文本框
	 */
	@ApiModelProperty("类型 1-链接 2-富文本框")
	@NotNull(message = "类型不能为空", groups = {Edit.class, Add.class})
	private Integer bannerType = 1;

	/**
	 * 广告图地址
	 */
	@ApiModelProperty("广告图地址")
	@NotNull(message = "广告图不能为空", groups = {Edit.class, Add.class})
	@NotEmpty(message = "广告图不能为空", groups = {Edit.class, Add.class})
	private String bannerImg;

	/**
	 * 广告内容：链接、富文本框内容等
	 */
	@ApiModelProperty("广告内容：链接、富文本框内容等")
	@NotNull(message = "广告内容不能为空", groups = {Edit.class, Add.class})
	@NotEmpty(message = "广告内容不能为空", groups = {Edit.class, Add.class})
	private String bannerContent;

	/**
	 * 备注
	 */
	@ApiModelProperty("备注")
	private String remark;

	/**
	 * 是否有效 1-有效 -无效
	 */
	@ApiModelProperty("是否有效 1-有效 -无效")
	private Integer status = 1;

	/**
	 * 排序
	 */
	@ApiModelProperty("排序")
	@NotNull(message = "排序不能为空", groups = {Edit.class, Add.class})
	private Integer sortOrder = 0;
}
